import { Component, OnInit } from '@angular/core';
import { _HttpClient } from '@delon/theme';
import { Router, ActivatedRoute } from '@angular/router';
import { HttpService, SupDic } from 'lbf';

@Component({
  selector: 'app-tyjb-xxxq',
  templateUrl: './xxxq.component.html',
})
export class TyjbXxxqComponent implements OnInit {
  xxDetail: any;
  FSR: any;
  JSR: any;

  constructor(
    private http: _HttpClient,
    private router: ActivatedRoute,
    private supdic: SupDic,
    private httpService: HttpService,
  ) {}

  ngOnInit() {
    this.router.queryParams.subscribe(param => {
      console.log(param);
      this.xxDetail = param;
      this.FSR = this.supdic.getdicLabel('USERID', this.xxDetail['FSR']);
      if (
        this.xxDetail.hasOwnProperty('FS') ||
        this.xxDetail.hasOwnProperty('JS')
      ) {
        this.JSR = this.supdic.getdicLabel('USERID', this.xxDetail['JSR']);
      } else {
        this.JSR = this.xxDetail['JSR'];
      }
    });
  }
}
